<template>
  <div>
    <div class="where">
      <router-link to="/index">首页</router-link>
      <span>&gt;</span>
      <a href="#">资料下载</a>
    </div>


    <div class="flex faq">
      <div class="side-nav">
        <ul>
          <li
            :class="[select_node == item.node_code ? 'on' : '']"
            @click="ChangeNodeSearch(item)"
            v-for="(item, index) in issueClassify"
            :index="item.node_code" :key="item.node_code"
          >
            <a href="javascript:void(0);" class="first"
              >{{ item.node_name }}
              <i class="iconfont">&#xe620;</i>
            </a>
          </li>
        </ul>
      </div>

      <div class="fx1">
        <div class="download-center">
          <div class="download-list-head">资料下载</div>
          <div class="download-list fx1">
            <ul>
              <li v-for="(item, index) in list" :index="item.id" :key="item.id">
                <a href="#">
                  <div class="tit">{{ item.title }}</div>
                  <div class="date">{{ item.publish_date }}</div>
                </a>
              </li>
            </ul>
          </div>
          <div class="page clear">
            <el-pagination
              background="#0b5c8b"
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page.sync="currentPage3"
              layout="prev, pager, next, jumper"
              :total="pagetotal"
            >
              <el-pagination
                background
                layout="prev, pager, next"
                :total="1000"
              >
              </el-pagination>
            </el-pagination>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { getContentList, getters, GetChildNode } from "../../api/public";
export default {
    name: "download",
  data() {
    return {
      issueClassify: [],
      select_node: "",
      defaultId: "1",
      list: [],
      base_url: process.env.VUE_APP_BASE_API,
      pagetotal: 0,
    };
  },
  mounted() {
    this.getClassify();
  },

  methods: {
    ChangeNodeSearch(node_item) {
      this.select_node = node_item.node_code;
      this.getList(1);
    },
    //获取栏目的直接下级栏目
    getClassify() {
      GetChildNode({
        lang: "sc",
        node_code: "zlxz",
        show_menu: "-1",
        show_path: "-1",
        is_show: "1",
      }).then((res) => {
        this.issueClassify = res.data.children;
        this.select_node = this.issueClassify[0].node_code;
        this.getList(1);
      });
    },
    getList(ipage) {
      getContentList({
        condition: { node_code: this.select_node, lang: "sc" },
        ipage: ipage,
        page_size: "10",
      }).then((res) => {
        this.list = res.data.list;
        this.pagetotal = res.data.total;
        if (res.data.total.length > 6) {
        }
      });
    },
    handleSizeChange() {},
    handleCurrentChange() {},
    currentPage3() {},
  },
};
</script>
<style >
.el-pagination__jump .el-input__inner {
  font-size: 14px !important;
  color: #fff !important;
  margin: 0 10px !important;
  border: 1px solid #0b5c8b !important;
  background: transparent !important;
  outline: none !important;
  text-align: center !important;
  height: 34px !important;
  width: 50px !important;
  -webkit-box-sizing: border-box !important;
  -moz-box-sizing: border-box !important;
  box-sizing: border-box !important;
}
.btn-prev {
  width: 78px !important;
  background-color: transparent !important;
  display: inline-block !important;
  line-height: 32px !important;
  font-size: 14px !important;
  color: #fff !important;
  margin: 0 5px !important;
  border: 1px solid #0b5c8b !important;
}
.btn-next {
  width: 78px !important;
  background-color: transparent !important;
  display: inline-block !important;
  line-height: 32px !important;
  font-size: 14px !important;
  color: #fff !important;
  margin: 0 5px !important;
  border: 1px solid #0b5c8b !important;
}

</style>
